package com.googlecode.gaal.vis.impl;

import com.googlecode.gaal.vis.api.NodeStyle;

public class TikzDrawing extends AbstractTikzDrawing {

    private static final String EDGE_FORMAT = "\\draw[%s] (%d) -- node {%s} (%d);\n";
    protected static final String LABELLED_EDGE_FORMAT = "\\draw[%s] (%d) -- node[midway,sloped,above] {%s} (%d);\n";

    public TikzDrawing(Appendable output) {
        super(output);
    }

    @Override
    protected String getEdgeFormat() {
        return EDGE_FORMAT;
    }

    @Override
    protected String getLabelledEdgeFormat() {
        return LABELLED_EDGE_FORMAT;
    }

    @Override
    protected String formatNodeStyle(NodeStyle style) {
        return String.format("%s,circle", super.formatNodeStyle(style));
    }
}
